﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ESRI.ArcGIS.Client;
using ESRI.ArcGIS.Client.Symbols;

namespace eGrid_App
{
    public class TroubleTicket : Graphic
    {
        //private Graphic myFeature;
        private ScatterLayer parentLayer;

        public Graphic originalGraphic;

        public TroubleTicket(ScatterLayer sl) : base()
        {
            parentLayer = sl;
        }

        public int Priority
        {
            set
            {
                    switch (value)
                    {
                        case 1:
                            Symbol = (PictureMarkerSymbol)parentLayer.BackgroundMap.LayoutRoot.Resources["GreenTicket"];
                            break;
                        case 2:
                            Symbol = (PictureMarkerSymbol)parentLayer.BackgroundMap.LayoutRoot.Resources["OrangeTicket"];
                            break;
                        case 3:
                            Symbol = (PictureMarkerSymbol)parentLayer.BackgroundMap.LayoutRoot.Resources["RedTicket"];
                            break;
                    }
                
            }
        }

    }
}
